import { AuditStatusEnum, AuthTypeEnum, CertificateTypeEnum, ThridTypeEnum } from "@/enums/LoginEnum";

export enum RoleEnum {
  // 普通
  Ordinary = 1,
  // 会员
  Member = 2,
  // 管理员
  System = 3,
  // 门店管理员
  storeStaff = 4
}

export interface ILoginData {
  code: string;
  thridType: ThridTypeEnum;
  secretKey?: string
  shareId?: string
}

export interface ILoginRes {
  token: string;
  // 是否有手机号
  isBind: boolean;
  // 用户唯一ID
  socialUserId: string;
  /** 租户id */
  tenantId: "888";
  /** 公众号关注状态 */
  // isOfficialAccount: IsOfficialAccountEnum;
  /** 用户信息 */
  // appUser: IUserInfo

}

export interface IGetPhoneNumber {
  iv?: string;
  code: string;
  encryptedData?: string;
  thridType: ThridTypeEnum;
}

export interface UserInfoData {
  accountId: number
  aiUserAccountBotVo: AiUserAccountBotVo
  aiBotCertificationVo: AiBotCertificationVo
  avatar: string
  currnetTenantId: number
  currnetUserBotInfoVo: null
  isBotAuthentication: boolean
  isOpenBot: boolean
  loginDate: string
  openid: string
  phone: string
  platformType: string
  token: string
  userBindId: number
  userId: number
  userName: string
  userShareId: string
}

/** 智能体 */
export interface AiUserAccountBotVo {
  id: number
  name: string
  backImage: string
  iconFileUrl: string
  uuid: string
  /** 用户智能体权限 */
  botType?: string
  qrCodeUrl: string
}

/** 智能体认证 */
export interface AiBotCertificationVo {
  /** 审核状态 */
  auditStatus: AuditStatusEnum
  /** 主体名称 */
  certificationName: string
  /** 认证类型 */
  certificationType: AuthTypeEnum
  /** 证书id */
  id: number
  /** 审核备注 */
  auditRemark: string
}

export interface WxPhoneCodeLoginData {
  thridType: ThridTypeEnum
  phone: string
  verificationCode: string
}

